<style lang="scss" scoped>
@import '@/assets/css/index';
  .award{
    position:absolute; 
    overflow:hidden; 
    -webkit-overflow-scrolling: touch; 
    top:0; 
    left:0; 
    bottom:0; 
    right:0;
    background-image: url('https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f025bed1-101b-4383-9c33-bbbeccec7177/3e882ebd-f847-49ea-9a14-181c84157bf6.png');
    background-size: 100% 100%;
    display: flex;
    flex-direction: column; 
    justify-content: space-around;
    align-items: center;
    .wrapper{
      position: fixed;
      bottom: 3%;
      left: 2rem;
      right: 2rem;
      padding: 16px;
      display: flex;
      flex-wrap:wrap;
      justify-content: space-around;
      align-items: center;
      background-color: white;
      border: 2px solid $mainColor;
      border-radius: 8px;
      box-sizing: border-box;
      overflow: hidden;
      text-align: center;
      font-size: 18px;
      color:$mainColor;
    }
  }
</style>
<template>
  <div class="award">
    <div class="wrapper">
      核销成功
    </div>
  </div>
</template>

<script>
// import utils from '@/assets/js/utils.js'
import {Toast,Dialog} from 'vant'

export default {
  name: 'pass',
  components: {
    [Dialog.name]:Dialog,
    [Toast.name]:Toast,
  },
  data(){
    return {
      oid: '111'
    }
  },
  mounted () {
    // window.location.href
    const url = window.location.href
    //const oidurl = this.$route.query.oid
    // alert('oidurl',oidurl)
    const oid = url.split('oid')[1].split('#')[0].split('=')[1]
    // alert('oid:'+oid)
    this.hexiao(oid)
  },
  methods: {
    hexiao(oid){
      let params = {
        oid: oid
      }
      this.$request.hexiao(params).then(res=>{
        //alert("res:"+JSON.stringify(res))
        if(res.errno == 0){
          Dialog.alert({
            title: '系统提示',
            message: res.message
          }).then(() => {
            // on close
          });
        }else{
          Dialog.alert({
            title: '系统提示',
            message: res.message
          }).then(() => {
            // on close
          });
        }
      })
    }
  }
}
</script>
